var demo2 = xmSelect.render({
		el: '#demo5',
		tree: {
			show: true,
			expandedKeys: true,
		},
		height: 'auto',
		data() {
			return [{
					name: '销售员',
					value: -1,
					children: [{
							name: '张三',
							value: 100,
							children: []
						},
						{
							name: '李四1',
							value: 2
						},
						{
							name: '王五1',
							value: 3
						},
					]
				},
				{
					name: '奖品',
					value: -2,
					children: [{
							name: '奖品3',
							value: -3,
							children: [{
									name: '苹果3',
									value: 14
								},
								{
									name: '香蕉3',
									value: 15
								},
								{
									name: '葡萄3',
									value: 16
								},
							]
						},
						{
							name: '苹果2',
							value: 4
						},
						{
							name: '香蕉2',
							value: 5
						},
						{
							name: '葡萄2',
							value: 6
						},
					]
				},
			]
		}
	})
	var demo2 = xmSelect.render({
		el: '#demo4',
		tree: {
			show: true,
			expandedKeys: true,
		},
		height: 'auto',
		data() {
			return [{
					name: '销售员',
					value: -1,
					children: [{
							name: '张三',
							value: 100,
							children: []
						},
						{
							name: '李四1',
							value: 2
						},
						{
							name: '王五1',
							value: 3
						},
					]
				},
				{
					name: '奖品',
					value: -2,
					children: [{
							name: '奖品3',
							value: -3,
							children: [{
									name: '苹果3',
									value: 14
								},
								{
									name: '香蕉3',
									value: 15
								},
								{
									name: '葡萄3',
									value: 16
								},
							]
						},
						{
							name: '苹果2',
							value: 4
						},
						{
							name: '香蕉2',
							value: 5
						},
						{
							name: '葡萄2',
							value: 6
						},
					]
				},
			]
		}
	})
	function query(){
		alert("查询")
	}
	function reset() {
		document.getElementById('demoReload').value = ''
		document.getElementById('demoReload1').value = ''
		document.getElementById('demoReload2').value = ''
	}
	let data = [{
		"number": "1",
		"processname": "流程名称",
		"processtemplate": "流程模板",
		"dcumentno ": "123456789",
		"currentnode": "营销中心需求信息",
		"processingtime": "2021-08-21 20:20",
		"handler": "张三",
		'processingresults': "同意",
		"initiator": "李四",
		"processstatus": "进行中"
	}]
	layui.use(['form', 'table', 'layedit', 'laydate'], function() {
		var form = layui.form,
			layer = layui.layer,
			layedit = layui.layedit,
			laydate = layui.laydate;
		var table = layui.table;

		table.render({
			elem: '#test',
			data: data,
			cellMinWidth: 80 //全局定义常规单元格的最小宽度，layui 2.2.1 新增
				,
			cols: [
				[{
						field: 'number',
						title: '序号'
					}, {
						field: 'processname',
						title: '流程名称'
					}, {
						field: 'processtemplate',
						title: '付款申请'
					}, {
						field: 'dcumentno ',
						title: '单据号',
						event: 'dcumentNo',
						style: 'cursor: pointer;'
					}, {
						field: 'processingresults',
						title: '处理结果'
					} //minWidth：局部定义当前单元格的最小宽度，layui 2.2.1 新增
					, {
						field: 'processingtime',
						title: '处理时间'
					},
					{
						field: 'initiator',
						title: '发起人'
					},
					{
						field: 'processstatus',
						title: '流程状态'
					}


				]
			],
			page: true
		})
		//监听行单击事件（双击事件为：rowDouble）
		//监听单元格事件
		  table.on('tool(test)', function(obj){
		    var data = obj.data;
		    if(obj.event === 'dcumentNo'){
		      parent.layui.index.openTabsPage('views/jsp/Processcenter/myyibanch.jsp', '我的已办子页面');
		    }
			e.stopPropagation();
		  });
		table.on('row(test)', function(obj) {
			parent.layui.index.openTabsPage('views/jsp/Processcenter/jindujiedian.jsp', '整体进度节点');
		});
	});